<?php session_start();?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <link rel="stylesheet" type="text/css" href="maintenancePagesCSS.css" />
        <title>Add Customer</title>
    <style type="text/css">

    </style></head>
    <body>

    <center>
		
            <form name="CustomerForm" action="CustomerAddFunc.php" method="post" id="CustomerForm">

                  <table width="1000" height="531" border="0" background="images/background.jpg">
                  <tr>
                    <th height="494" bgcolor="#454343" scope="col"><p><img src="images/TitleCustomerInformation.gif" alt="Customer Information" width="514" height="67"> </p>
                      <table border="0" bgcolor="#666666" class="EditTable">
                      
                      <tbody>
                        <tr>
                          <td>*Last Name:</td>
                          <td><input type="text" name="CustomerLast" value="" size="25" id="CustomerLast" /></td>
                        </tr>
                        <tr>
                          <td>*First Name:</td>
                          <td><input type="text" name="CustomerFirst" value="" size="25" id="CustomerFirst"/></td>
                        </tr>
                        <tr>
                          <td>Address:</td>
                          <td><input type="text" name="CustomerAddress" value="" size="25" /></td>
                        </tr>
                        <tr>
                          <td>City:</td>
                          <td><input type="text" name="CustomerCity" value="" size="25" /></td>
                        </tr>
                        <tr>
                          <td>State:</td>
                          <td><input type="text" name="CustomerState" value="" size="25" /></td>
                        </tr>
                        <tr>
                          <td>Zip:</td>
                          <td><input type="text" name="CustomerZip" value="" size="25" /></td>
                        </tr>
                        <tr>
                          <td>*Phone 1:</td>
                          <td><input type="text" name="CustomerPhone1" value="" size="25" id="CustomerPhone1"/></td>
                        </tr>
                        <tr>
                          <td>Phone 2:</td>
                          <td><input type="text" name="CustomerPhone2" value="" size="25" /></td>
                        </tr>
                        <tr>
                          <td>Phone 3:</td>
                          <td><input type="text" name="CustomerPhone3" value="" size="25" /></td>
                        </tr>
                        <tr>
                          <td>Email:</td>
                          <td><input type="text" name="CustomerEmail" value="" size="25" /></td>
                        </tr>
                        <tr>
                          <td colspan=2><center>
                              <input type="button" name="Add" value="Add" onClick="submitAddCust();"/>
                              <input type="reset" name="Clear" value="Clear"/>
                          </center></td>
                        </tr>
                      </tbody>
                    </table>
                      <center>
                        <address>
                        </address>
                        <address>
                        * denotes required field                        
                        </address>
                      </center>
                      <center>
                        <br>
<script src="links.js" language="javascript" type="text/javascript"></script>
<script type="text/javascript">
            writeCustomerLinks("", "");
</script>
                      </center>
                    <p>&nbsp;</p></th>
                  </tr>
                  <tr>
                    <th height="31" bgcolor="#454343" scope="col">&nbsp;</th>
                  </tr>
              </table>
          </form>
			
            <address>
            </address>
        </center>
        </body>

    <script type="text/javascript">
        function submitAddCust()
        {
            var strCorrect = "Please correct the following errors:\n";
            var strCompare = strCorrect;
            strCorrect += checkFields();
            if(strCorrect == strCompare)
            {
               document.getElementById("CustomerForm").submit();
            }
            else
            {
                alert(strCorrect);
            }
        }

        function checkFields()
        {
            var str = "";

            str += (document.getElementById("CustomerLast").value == "") ? "  - Last Name is Blank\n" : "";

            str += (document.getElementById("CustomerFirst").value == "") ? "  - First Name is Blank\n" : "";

            str += (document.getElementById("CustomerPhone1").value == "") ? "  - Phone Number is Blank\n" : "";

            return str;
        }
    </script>
</html>
